package com.neouton.crm.transpondEmail.mapper;

import com.neouton.crm.entity.SysUserEntity;
import com.neouton.crm.transpondEmail.entity.TranspondEmailVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface TranspondEmailMapper {

    /**
     * 新增转发人
     * @param transpondEmailVO
     */
    void insertTranspondEmailInfo(@Param("transpondEmailVO")TranspondEmailVO transpondEmailVO);

    List<TranspondEmailVO> selectTranspondEmail(@Param("approvalId")Integer approvalId);

    /**
     * 新增转发人
     * @param approvalId 审批ID
     * @param transpondUsers 转发用户集合
     */
    void insertTranspondEmailInfoByUser(@Param("approvalId")Integer approvalId,
                                        @Param("transpondUsers")List<SysUserEntity> transpondUsers);

    /**
     * 新增转发人
     * @param transpondEmailVO
     */
    void insertTranspondEmailInfoByType(@Param("transpondEmailVO")TranspondEmailVO transpondEmailVO);

    List<TranspondEmailVO> selectTranspondEmailByType(@Param("typeId")Integer typeId, @Param("todoType")Integer todoType);

}
